<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>登录页面</title>
    <meta http-equiv=Content-Type content="text/html; charset=utf-8">
    <link th:href="@{/css/style.css}"
          type=text/css rel=stylesheet>
    <link th:href="@{/css/boot-crm.css}"
          type=text/css rel=stylesheet>
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
    <script th:src="@{/js/jquery-1.11.3.min.js}">
    </script>
    <meta content="MSHTML 6.00.2600.0" name=GENERATOR>
    <script>
        // 判断是登录账号和密码是否为空
        function check(){
            var usercode = $("#usercode").val();
            var password = $("#password").val();
            if(usercode=="" || password==""){
                $("#message").text("账号或密码不能为空！");
                return false;
            }
            return true;
        }
    </script>
</head>
<body leftMargin=0 topMargin=0 marginwidth="0" marginheight="0"
      th:style="'background:url(' + @{/images/rightbg.jpg} + ');'">
<div ALIGN="center">
    <table border="0" width="1140px" cellspacing="0" cellpadding="0"
           id="table1">
        <tr>
            <td height="93"></td>
            <td></td>
        </tr>
        <tr>
            <td th:style="'background:url(' + @{/images/rights.jpg} + ');'"
                width="740" height="412">
            </td>
            <td class="login_msg" width="400" align="center">
                <!-- margin:0px auto; 控制当前标签居中 -->
                <fieldset style="width: auto; margin: 0px auto;">

                        <p style="font-size:25px;font-family: cursive">
                            欢迎使用客户管理系统
                        </p>

                    <p color="red" style="font-size:15px;font-family: cursive">
                        <span id="message" th:text="${msg}"></span>
                    </p>
<!--                    提交后的位置：/WEB-INF/jsp/customer.jsp-->
                    <form th:action="@{/login }"
                          method="post" onsubmit="return check()">
                        <br /><br />
                       <span style="font-size:15px;font-family: cursive"> 账&nbsp;号：</span><input id="usercode" type="text" name="usercode" />
                        <br /><br />
                        <span style="font-size:15px;font-family: cursive">密&nbsp;码：</span><input id="password" type="password" name="password" />
                        <br /><br />                        <br /><br />

                        <button type="submit" value="登录" class="btn btn-primary" th:width="70px" style="color: black">登录</button>

                    </form>
                </fieldset>
            </td>
        </tr>
    </table>
</div>
</body>
</html>